package cn.zjutleo.village_server.mapper;

import cn.zjutleo.village_server.entity.Message;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MessageMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Message record);

    int insertSelective(Message record);

    Message selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Message record);

    int updateByPrimaryKey(Message record);

    List<Message> selectMessageListByUserId(Integer userId);

    Integer selectAllMessageAccountByUserId(Integer userId);

    Integer selectNotReadMessageAccountByUserIdAndType(@Param("userId") Integer userId, @Param("type") Integer type);
}